<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="m@markzou.com">
    <link rel="shortcut icon" href="favicon.png">
    <title>花予茶 - 商城首页</title>

    <!-- fav icons -->
    <link rel="shortcut icon" href="assets/img/favicon.png" />

    <link rel="stylesheet" type="text/css" href="assets/css/inc_default_theme.css">
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.css">

    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/jquery-1.7.2.min.js"></script>

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respipond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="assets/js/html5shiv.js"></script>
      <script src="assets/js/respond.min.js"></script>
    <![endif]-->


    <script type="text/javascript">
        $(document).ready(function () {

            //jquery特效制作复选框全选反选取消(无插件)
            // 全选
            $(".allselect").click(function () {

                if($(this).attr("checked")){
                    $(".gwc_tb2 input[name=newslist]").each(function () {
                        $(this).attr("checked", true);
                        // $(this).next().css({ "background-color": "#3366cc", "color": "#ffffff" });
                    });
                    GetCount();

                }
                else
                {
                    $(".gwc_tb2 input[name=newslist]").each(function () {
                        if ($(this).attr("checked")) {
                            $(this).attr("checked", false);
                            //$(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
                        } else {
                            $(this).attr("checked", true);
                            //$(this).next().css({ "background-color": "#3366cc", "color": "#000000" });
                        }
                    });
                    GetCount();

                }

            });

            //反选
            $("#invert").click(function () {
                $(".gwc_tb2 input[name=newslist]").each(function () {
                    if ($(this).attr("checked")) {
                        $(this).attr("checked", false);
                        //$(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
                    } else {
                        $(this).attr("checked", true);
                        //$(this).next().css({ "background-color": "#3366cc", "color": "#000000" });
                    }
                });
                GetCount();
            });

            //取消
            $("#cancel").click(function () {
                $(".gwc_tb2 input[name=newslist]").each(function () {
                    $(this).attr("checked", false);
                    // $(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
                });
                GetCount();
            });

            // 所有复选(:checkbox)框点击事件
            $(".gwc_tb2 input[name=newslist]").click(function () {
                if ($(this).attr("checked")) {
                    //$(this).next().css({ "background-color": "#3366cc", "color": "#ffffff" });
                } else {
                    // $(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
                }
            });

            // 输出
            $(".gwc_tb2 input[name=newslist]").click(function () {
                // $("#total2").html() = GetCount($(this));
                GetCount();
                //alert(conts);
            });
        });
        //******************
        function GetCount() {
            var conts = 0;
            var aa = 0;
            $(".gwc_tb2 input[name=newslist]").each(function () {
                if ($(this).attr("checked")) {
                    for (var i = 0; i < $(this).length; i++) {
                        conts += parseInt($(this).val());
                        aa += 1;
                    }
                }
            });
            $("#shuliang").text(aa);
            $("#zong1").html((conts).toFixed(2));
            $("#jz1").css("display", "none");
            $("#jz2").css("display", "block");
        }
    </script>

</head>

<body>

<div class="container-fluid nopadding">

    <div class="page_content_orderpage">

        <div class="pc_head">

            <div class="pc_top">
                <div class="pc_w1200">
                    <ul class="pct_lnav" style="float: right;">
                        <li>零下一度，欢迎您！请 <a href="">登录</a> / <a href="">注册</a></li>
                        <li><a href=""><span class="glyphicon glyphicon-user"></span> 我的花予茶</a></li>
                        <li><a href=""><span class="glyphicon glyphicon-book"></span> 帮助中心</a></li>
                    </ul>
                    <ul class="pct_lnav">
                        <li><a href="">收藏本站</a></li>
                        <li>您现在位置 <a href="">上海</a></li>
                    </ul>
                </div>
            </div>

            <div class="pc_nav">
                <div class="pc_w1200">
                    <div class="huacha_logo"><a href="">花予茶</a></div>
                    <div class="top_catalog"><img src="assets/img/icons/catalog.png" alt=""/></div>
                    <div class="top_ad"><img data-src="holder.js/700x130" alt=""></div>
                    <div class="head_control">
                        <div class="shopping_cart">
                            <a href="">
                                <div class="cart_name"><span class="glyphicon glyphicon-shopping-cart"></span> 购物车</div>
                                <div class="cart_num">12</div>
                            </a>
                        </div>
                        <div class="nav_search">
                            <div class="search_bot"><input type="image" src="assets/img/bg/bot.png"/></div>
                            <div class="search_input"><input type="text" class="form-control" placeholder="搜索关键词"></div>
                        </div>
                        <ul class="main_nav">
                            <li><a href="" class="current">网站首页</a></li>
                            <li><a href="">所有商品</a></li>
                            <li><a href="">促销活动</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="pc_local">
            <div class="pc_w1200">
                <ul class="gps">
                    <li><span class="glyphicon glyphicon-map-marker"></span></li>
                    <li><a href="">网站首页</a></li>
                    <li><a href="" class="current">所有产品</a></li>
                </ul>
            </div>
        </div>

        <div class="pc_body">
            <div class="pc_w1200">

                <div class="pc_mod">

                    <div class="cart_main">
                        <div class="cm_t"><img src="assets/img/icons/cart.png" alt=""/></div>



                        <div class="gwc" style=" margin:auto;">
                            <div class="gwc_t">全部商品 2</div>
                            <table cellpadding="0" cellspacing="0" class="gwc_tb1">
                                <tr>
                                    <td class="tb1_td1"><input id="Checkbox1" type="checkbox"  class="allselect"/></td>
                                    <td class="tb1_td2">全选</td>
                                    <td class="tb1_td3">商品</td>
                                    <td class="tb1_td4">单价（元）</td>
                                    <td class="tb1_td5">数量</td>
                                    <td class="tb1_td6">小计（元）</td>
                                    <td class="tb1_td7">操作</td>
                                </tr>
                            </table>

                            <!---商品加减算总数---->
                            <script type="text/javascript">
                                $(function () {
                                    var t = $("#text_box1");
                                    $("#add1").click(function () {
                                        t.val(parseInt(t.val()) + 1)
                                        setTotal(); GetCount();
                                    })
                                    $("#min1").click(function () {
                                        if(t.val()>0){
                                            t.val(parseInt(t.val()) - 1)
                                            setTotal(); GetCount();
                                        }
                                    })
                                    function setTotal() {

                                        $("#total1").html((parseInt(t.val()) * 9).toFixed(2));
                                        $("#newslist-1").val(parseInt(t.val()) * 9);
                                    }
                                    setTotal();
                                })
                            </script>

                            <table cellpadding="0" cellspacing="0" class="gwc_tb2">
                                <tr>
                                    <td class="tb2_td1"><input type="checkbox" value="1" name="newslist" id="newslist-1" /></td>
                                    <td class="tb2_td2"><a href="#"><img data-src="holder.js/80x80" alt=""></a></td>
                                    <td class="tb2_td3"><a href="#">产品标题</a></td>
                                    <td class="tb1_td4">￥9.00</td>
                                    <td class="tb1_td5">
                                        <input id="min1" name=""  style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="-" />
                                        <input id="text_box1" name="" type="text" value="1" style=" width:30px; text-align:center; border:1px solid #ccc;" />
                                        <input id="add1" name="" style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="+" />
                                    </td>
                                    <td class="tb1_td6"><label id="total1" class="tot" style="color:#ff5500;font-size:14px; font-weight:bold;"></label></td>
                                    <td class="tb1_td7"><a href="#">删除</a></td>
                                </tr>
                            </table>

                            <!---商品加减算总数---->
                            <script type="text/javascript">
                                $(function () {
                                    var t = $("#text_box2");
                                    $("#add2").click(function () {
                                        t.val(parseInt(t.val()) + 1)
                                        setTotal(); GetCount();
                                    })
                                    $("#min2").click(function () {
                                        if(t.val()>0){
                                            t.val(parseInt(t.val()) - 1)
                                            setTotal(); GetCount();
                                        }
                                    })
                                    function setTotal() {

                                        $("#total2").html((parseInt(t.val()) * 8).toFixed(2));
                                        $("#newslist-2").val(parseInt(t.val()) * 8);
                                    }
                                    setTotal();
                                })
                            </script>
                            <table cellpadding="0" cellspacing="0" class="gwc_tb2">
                                <tr>
                                    <td class="tb2_td1"><input type="checkbox" value="1" name="newslist" id="newslist-2" /></td>
                                    <td class="tb2_td2"><a href="#"><img data-src="holder.js/80x80" alt=""></a></td>
                                    <td class="tb2_td3"><a href="#">产品标题</a></td>
                                    <td class="tb1_td4">￥8.00</td>
                                    <td class="tb1_td5">
                                        <input id="min2" name=""  style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="-" />
                                        <input id="text_box2" name="" type="text" value="1" style=" width:30px; text-align:center; border:1px solid #ccc;" />
                                        <input id="add2" name="" style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="+" />
                                    </td>
                                    <td class="tb1_td6"><label id="total2" class="tot" style="color:#ff5500;font-size:14px; font-weight:bold;"></label></td>
                                    <td class="tb1_td7"><a href="#">删除</a></td>
                                </tr>
                            </table>

                            <!---总数---->
                            <script type="text/javascript">
                                $(function () {
                                    $(".quanxun").click(function () {
                                        setTotal();
                                        //alert($(lens[0]).text());
                                    });
                                    function setTotal() {
                                        var len = $(".tot");
                                        var num = 0;
                                        for (var i = 0; i < len.length; i++) {
                                            num = parseInt(num) + parseInt($(len[i]).text());

                                        }
                                        //alert(len.length);
                                        $("#zong1").text(parseInt(num).toFixed(2));
                                        $("#shuliang").text(len.length);
                                    }
                                    //setTotal();
                                })
                            </script>
                            <table cellpadding="0" cellspacing="0" class="gwc_tb3">
                                <tr>
                                    <td class="tb1_td1">&nbsp;</td>
                                    <td class="tb1_td1">&nbsp;</td>
                                    <td class="tb3_td1">&nbsp;</td>
                                    <td class="tb3_td2">已选商品 <label id="shuliang" style="color:#ff5500;font-size:14px; font-weight:bold;">0</label> 件</td>
                                    <td class="tb3_td3">合计(不含运费):<span>￥</span><span style=" color:#ff5500;"><label id="zong1" style="color:#ff5500;font-size:18px; font-weight:bold;"></label></span></td>
                                    <td class="tb3_td4"><span id="jz1">结算</span><a href="#" style=" display:none;"  class="jz2" id="jz2">结算</a></td>
                                </tr>
                            </table>

                        </div>


                    </div>
                    
                </div>


            </div>
        </div>

        <div class="pc_footer">
            <div class="pc_w1200">
                <div class="pc_mod">
                    <div class="footer_ad"><a href=""><img data-src="holder.js/100%x170" alt=""></a></div>

                    <ul class="footer_info">
                        <li class="li_fa">
                            <div class="info_text">
                                品质保障
                                <span>购物至此无忧</span>
                            </div>
                        </li>
                        <li class="li_fb">
                            <div class="info_text">
                                7天退换货
                                <span>售后无忧保障</span>
                            </div>
                        </li>
                        <li class="li_fc">
                            <div class="info_text">
                                特色体验
                                <span>不一样的服务</span>
                            </div>
                        </li>
                        <li class="li_fd">
                            <div class="info_text">
                                帮助中心
                                <span>您的购物指南</span>
                            </div>
                        </li>
                    </ul>
                    <ul class="footer_service">
                        <li class="li_fe">
                            <div class="wx"><img src="assets/img/icons/wx.jpg" alt="" class="img-responsive"/></div>
                            <div class="shuoming">"扫一扫，下载花予茶手机客户端"</div>

                        </li>
                        <li class="li_ff">
                            <img src="assets/img/bg/foot_27.png" alt="" class="img-responsive"/>
                        </li>
                        <li class="li_fg">
                            <div class="tel400">400-100-5678</div>
                            <div class="teltime">周一至周日 08:00-18:00<br>（仅收市话费）</div>
                            <div class="teltime">
                                <div class="tbot"><a href=""><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> 7X8小时在线客服</a></div>
                            </div>
                        </li>
                    </ul>
                    <div class="footer_copyright">
                        <span>huayucha.com</span>
                        <span>沪icp证1105665号</span>
                        <span>沪icp备1105665号</span>
                        <span>沪公安网备110566787865号</span>
                        <span>沪网文[2015]0059-0009号</span>
                    </div>
                </div>
            </div>
        </div>


    </div>

</div>

<script src="assets/js/holder.js"></script>
<script src="assets/js/modal.js"></script>
<script src="assets/js/tab.js"></script>
<script src="assets/js/Calculation.js"></script>


</body>
</html>
